public class Demo15 {
    private static Object locker = new Object();

    public static void func1(){
        synchronized (locker){
            func2();
        }
    }
    public static void func2(){
        func3();
    }
    public static void func3(){
        func4();
    }
    public static void func4(){
        synchronized (locker)
        {

        }
    }
}
